package com.liming.common.pojo.dto.order.admin;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.liming.common.pojo.dto.PageDTO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDate;

/**
 * @author liming
 * @date 2025/2/28
 */
@Data
@Schema(description = "订单分页查询")
@EqualsAndHashCode(callSuper = true)
public class OrderPageQuery extends PageDTO {

    @Schema(description = "订单号", requiredMode = Schema.RequiredMode.AUTO)
    private String orderNo;

    @Schema(description = "用户名称", requiredMode = Schema.RequiredMode.AUTO)
    private String username;

    @Schema(description = "线下自提 0否 1是", requiredMode = Schema.RequiredMode.AUTO)
    private Integer pickup;

    @Schema(description = "订单状态", requiredMode = Schema.RequiredMode.AUTO)
    private Integer status;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Schema(description = "开始时间", requiredMode = Schema.RequiredMode.AUTO)
    private LocalDate startTime;

    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @Schema(description = "结束时间", requiredMode = Schema.RequiredMode.AUTO)
    private LocalDate endTime;
}
